Binary search tree
Convert Sorted List to Binary Search Tree
leetcode algorithm binary search tree linked list
Comments CountProblem description
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
Lowest Common Ancestor of a Binary Search Tree (LC235)
leetcode algorithm binary search tree
Comments CountProblem description
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.
Kth Smallest Element in a BST (LC230)
leetcode algorithm binary search tree
Comments CountProblem description
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.
Binary Search Tree Iterator (LC173)
leetcode algorithm binary search tree
Comments CountProblem description
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.
Binary Search Tree to Greater Sum Tree (LeetCode 1038)
leetcode algorithm binary search tree
Comments CountProblem Description
Given the root of a binary search tree with distinct values, modify it so that every node has a new value equal to the sum of the values of the original tree that are greater than or equal to node.val.